<template>
	<view>
		<navbar :isback="true" title="订单详情"></navbar>
		<u-loading-page icon-size="100rpx" :loading="loading" loading-text="驼乡生活信息超市"></u-loading-page>
		<view class="form" v-if="!loading">
			<view class="form__item">
				<view class="form__item__lable">
					类别
				</view>
				<!-- 2=集百福,3=弄首歌,4=种棵树,5=定摆件 -->
				<view class="inp" v-if="form.type==2">
					集百福
				</view>
				<view class="inp" v-if="form.type==3">
					弄首歌
				</view>
				<view class="inp" v-if="form.type==4">
					种棵树
				</view>
				<view class="inp" v-if="form.type==5">
					定摆件
				</view>
				<view class="inp" v-if="form.type==6">
					散百财
				</view>
				<view class="inp" v-if="form.type==7">
					制像章
				</view>
			</view>
			<view class="form__item">
				<view class="form__item__lable">
					姓名
				</view>
				<input class="inp" v-model="form.name" placeholder="请输入真实姓名" :disabled="true"/>
				
			</view>
			<view class="form__item">
				<view class="form__item__lable">
					电话
				</view>
				<input class="inp" placeholder="请输入电话号码" v-model="form.phone" :disabled="true" maxlength="11" type="number"/>
				
			</view>
			<view class="form__item">
				<view class="form__item__lable">
					住址
				</view>
				<input class="inp" placeholder="请输入详细住址" :disabled="true" v-model="form.address"/>
				
			</view>
			<view class="form__item" v-if="form.type==4">
				<view class="form__item__lable">
					树杆所写文字
				</view>
				<view class="inp">
					{{form.text}}
				</view>
			</view>
			<view class="form__item" v-if="form.type==5">
				<view class="form__item__lable">
					摆件正面背面文字
				</view>
				<view class="inp">
					{{form.text}}
				</view>
			</view>
			<view class="form__item" v-if="form.type==5">
				<view class="form__item__lable">
					摆件款式尺寸
				</view>
				<view class="inp">
					{{form.size}}
				</view>
			</view>
			<view class="form__item" v-if="form.type==3">
				<view class="form__item__lable">
					定制项目
				</view>
				<view class="inp">
					{{form.make_subject}}
				</view>
			</view>
			<view class="form__item" v-if="form.type==7">
				<view class="form__item__lable">
					数量
				</view>
				<view class="inp">
					{{form.number}}
				</view>
			</view>
			<!-- 制像章图片 -->
			<view class="form__item" v-if="form.type==7">
				<view class="form__item__lable">
					制像章图片
				</view>
				<view class="inp">
					<image :src="URL(form.image)" class="form__item__pic" mode="aspectFill" @click="preview([URL(form.image)],0)"></image>
				</view>
			</view>
			
			
			<view class="form__item">
				<view class="form__item__lable">
					价格
				</view>
				<view class="inp">
					￥{{form.price}}
				</view>
			</view>
		</view>
		<view class="kf">
			<button class="u-reset-button" open-type="contact">
				<image src="/static/xishi/kf.png" class="kficon" mode=""></image>
			</button>
		</view>
	</view>
</template>

<script>
	import home from '@/api/_home.js'
	export default {
		data() {
			return {
				form:{},
				loading:true
			};
		},
		onLoad(o) {
			home.orderTypeAdminInfo({id:o.id}).then(res=>{
				if(res.data.code==1){
					this.loading=false
					this.form=res.data.data
				}
			})
		}
	}
</script>

<style lang="scss">
.form{
	padding: 30rpx;
	&__item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 44rpx 0;
		&__lable{
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #000000;
			line-height: 30rpx;
		}
		&__pic{
			width: 120rpx;
			height: 120rpx;
			border-radius: 50%;
		}
		.inp{
			flex: 1;
			text-align: right;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #000000;
			margin-right: 22rpx;
		}
		/deep/.input-placeholder{
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #000000;
		}
	}
	&__title{
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 30rpx;
		color: #1E1E1E;
		line-height: 30rpx;
		display: flex;
		align-items: center;
		margin-top: 42rpx;
		margin-bottom: 30rpx;
		&__line{
			width: 11rpx;
			height: 32rpx;
			background: #3692FF;
			border-radius: 6rpx;
			margin-right: 12rpx;
		}
	}
}
</style>
